package org.aksw.xoperator.xmpp;

import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smackx.packet.MessageEvent;

public abstract class JabberUtils {

	/**
	 * DOCUMENT ME!
	 * 
	 * @param id
	 *            DOCUMENT ME!
	 * 
	 * @return DOCUMENT ME!
	 */
	public static Message composingNotification(String id) {
		Message mess = new Message();
		MessageEvent event = new MessageEvent();
		event.setComposing(true);
		event.setPacketID(id);
		mess.addExtension(event);
	
		return mess;
	}

	/**
	 * DOCUMENT ME!
	 * 
	 * @param id
	 *            DOCUMENT ME!
	 * 
	 * @return DOCUMENT ME!
	 */
	public static Message composingCancelNotification(String id) {
		Message mess = new Message();
		MessageEvent event = new MessageEvent();
		event.setComposing(false);
		event.setPacketID(id);
		mess.addExtension(event);
	
		return mess;
	}

}
